// JavaScript Document
function hideContent(theContent)
{
	if (document.getElementById(theContent).style.display == 'none')
	{
		 document.getElementById(theContent).style.display = 'block';
	}
	else
	{
		 secID = "section" + theContent;
		 imgID = "img" + theContent;
		 
		 document.getElementById(theContent).style.display = "none";
		 document.getElementById(secID).className = "SubMenu";
		 document.getElementById(imgID).src = "images/arrow.gif";
	}
}

function checkSelected(theContent)
{
	selContent = document.frmSection.secID.value;
	
	if (selContent == "")
	{
		hideContent(theContent);
		document.frmSection.secID.value = theContent;
	}
	else if (selContent==theContent)
	{
		hideContent(theContent);
		document.frmSection.secID.value = "";
		section_id = null;
	}
	else
	{
		hideContent(selContent);
		hideContent(theContent);
		document.frmSection.secID.value = theContent;			
	}
}

function swapIt(id, newclass, newimage) 
{ 
	secID = "section" + id;
	imgID = "img" + id;
	
	if(section_id != id) 
	{ 
		document.getElementById(secID).className = newclass; 
		document.getElementById(imgID).src = "images/" + newimage + ".gif";
	}
} 

function down (id,oldclass,newclass)
{ 
		oldSEC = "section" + section_id;
		oldIMG = "img" + section_id;
		secID = "section" + id;
		imgID = "img" + id;
		
		if(section_id != null) 
		{  
			document.getElementById(oldSEC).className = oldclass;
			document.getElementById(oldIMG).src = "images/arrow.gif";
		} 			

		document.getElementById(secID).className = newclass;
		document.getElementById(imgID).src = "images/arrowDownHover.gif";
		section_id = id; 
}

function downReview (id,oldclass,newclass)
{ 
		oldSEC = "section" + review_id;
		oldIMG = "img" + review_id;
		secID = "section" + id;
		imgID = "img" + id;
		
		if(review_id != null) 
		{  
			document.getElementById(oldSEC).className = oldclass;
			document.getElementById(oldIMG).src = "images/arrow.gif";
		} 			

		document.getElementById(secID).className = newclass;
		document.getElementById(imgID).src = "images/arrowDownHover.gif";
		review_id = id; 
}








function hideContentReview(theContent)
{
	if (document.getElementById(theContent).style.display == 'none')
	{
		 document.getElementById(theContent).style.display = 'block';
	}
	else
	{
		 secIDReview = "section" + theContent;
		 imgIDReview = "img" + theContent;
		 
		 document.getElementById(theContent).style.display = "none";
		 document.getElementById(secIDReview).className = "SubMenu";
		 document.getElementById(imgIDReview).src = "images/arrow.gif";
	}
}


function hideContentReview(theContent)
{
	if (document.getElementById(theContent).style.display == 'none')
	{
		 document.getElementById(theContent).style.display = 'block';
	}
	else
	{
		 secIDReview = "section" + theContent;
		 imgIDReview = "img" + theContent;
		 
		 document.getElementById(theContent).style.display = "none";
		 document.getElementById(secIDReview).className = "SubMenu";
		 document.getElementById(imgIDReview).src = "images/arrow.gif";
	}
}

function checkSelectedReview(theContent)
{
	selContentReview = document.frmSection.secIDReview.value;
	
	if (selContentReview == "")
	{
		hideContentReview(theContent);
		document.frmSection.secIDReview.value = theContent;
	}
	else if (selContentReview==theContent)
	{
		hideContentReview(theContent);
		document.frmSection.secIDReview.value = "";
		review_id = null;
	}
	else
	{
		hideContentReview(selContentReview);
		hideContentReview(theContent);
		document.frmSection.secIDReview.value = theContent;			
	}
}

function swapItReview(id, newclass, newimage) 
{ 
	secIDReview = "section" + id;
	imgIDReview = "img" + id;
	
	if(review_id != id) 
	{ 
		document.getElementById(secIDReview).className = newclass; 
		document.getElementById(imgIDReview).src = "images/" + newimage + ".gif";
	}
} 

function hideContentProject(theContent)
{
	if (document.getElementById(theContent).style.display == 'none')
	{
		 document.getElementById(theContent).style.display = 'block';
	}
	else
	{
		 secIDProject = "section" + theContent;
		 imgIDProject = "img" + theContent;
		 
		 document.getElementById(theContent).style.display = "none";
		 document.getElementById(secIDProject).className = "SubMenu";
		 document.getElementById(imgIDProject).src = "images/arrow.gif";
	}
}

function checkSelectedProject(theContent)
{
	selContent = document.frmSection.secIDProject.value;
	
	if (selContent == "")
	{
		hideContentProject(theContent);
		document.frmSection.secIDProject.value = theContent;
	}
	else if (selContent==theContent)
	{
		hideContentProject(theContent);
		document.frmSection.secIDProject.value = "";
		Project_id = null;
	}
	else
	{
		hideContentProject(selContent);
		hideContentProject(theContent);
		document.frmSection.secIDProject.value = theContent;			
	}
}

function swapItProject(id, newclass, newimage) 
{ 
	secIDProject = "section" + id;
	imgIDProject = "img" + id;
	
	if(Project_id != id) 
	{ 
		document.getElementById(secIDProject).className = newclass; 
		document.getElementById(imgIDProject).src = "images/" + newimage + ".gif";
	}
} 

function downProject (id,oldclass,newclass)
{ 
		oldSECProject = "section" + Project_id;
		oldIMGProject = "img" + Project_id;
		secIDProject = "section" + id;
		imgIDProject = "img" + id;
		
		if(Project_id != null) 
		{  
			document.getElementById(oldSECProject).className = oldclass;
			document.getElementById(oldIMGProject).src = "images/arrow.gif";
		} 			

		document.getElementById(secIDProject).className = newclass;
		document.getElementById(imgIDProject).src = "images/arrowDownHover.gif";
		Project_id = id; 
}
